package com.gtt.pattern.creational.prototype;

/**
 * Dog
 * 
 * @author Michael(gao12581@sina.com)
 * @date 2011-2-25 12:44:34
 * 
 */
public class Dog implements Cloneable {

    private int legCounts;

    public Dog(int legCounts) {
        super();
        this.legCounts = legCounts;
    }

    public void changeLegCounts() {
        this.legCounts *= 2;
    }

    @Override
    protected Dog clone() throws CloneNotSupportedException {
        return (Dog) super.clone();
    }

    @Override
    public String toString() {
        return Integer.toString(legCounts);
    }
}
